Ahmet Görkem Türk
A product’s price is affected by several factors such as cost, quality, marketing and even the macroeconomic policies of a country. However, our primary focus is how the brand and store selling these products affect the price of goods, particularly for mobile phones. Before conducting an econometric analysis, explaining current regulatory frameworks and market players, we made a literature review. In this part, we first examine the comprehensive studies that investigate the relationship between branding and price. After explaining the articles that expand the literature with the concept of anthropomorphism, we dived into the literature that studies mobile phone prices and branding. Lastly, we described the articles that analyze store effects on prices.
One of the significant problems in consuming is that there is asymmetric information between buyers and sellers about the quality of the products. As pioneer research of Milgrom and Roberts(1986) demonstrate that consumers use the brand name as a signal of the quality of goods and services which helps to overcome this issue. Using the brand name for judging the product also reduces the cost of search (Landes and Posher, 1987). However, there may be other factors like quality and durability that have an effect on the price of a good. Thus, Sullivan (1998) conduct research on the price of twin automobiles that are released under different brand names in order to control quality effects on price. He found that although their qualities are the same, therefore, they are perfect subsidies, automobiles’ price differs according to their brand name.
Park et al’s (2010) article are particularly significant not only due to wide attention from other academic sources but also because it empirically proves that consumers are willing to allocate higher resources to products that are from a brand to which they are attached. Their research was conducted using Apple iPod, oatmeal and university data. Their study is a kind of extension of similar scholars’ research on the same topic that argues emotional attachment to a brand is one of the reasons to be willing to pay the premium (Thomson, MacInnis, and Park 2005). Similarly, Dwivedi, Nayeem & Murshed (2018) found that automobile customers are willing to pay premiums for some brands.
Another important concept in the literature is anthropomorphism. It is a term to turn non-living objects, notions, and brands into human-like ones. Yuan, Dennis & Potter (2016) and MacInnis & Folkes (2017) argue that anthropomorphic brands may affect consumers’ willingness to pay. Moreover, Kwak, Rovereto and Puzakova (2013) found that consumer reactions to price increases and decreases differentiate between anthropomorphized and non-anthropomorphized brands. Siri can be an example of anthropomorphism in mobile phones which may have an impact on Apple branding and price (Shadid, 2022).
Although it is not a perfect fit for our scope of the research; however, to understand the dynamics that influence the price of a good, we can look at the country of origin as well since the county name may also be a sign of branding. In this part of the literature, there is no consensus on whether the origin of a good has a significant impact on price. While, Vaele & Quester (2008) and Troncoso & Aguirre (2006) argue that the origin of a product is important for the price of a good, Steiner (2004) claims the opposite.
Articles that are focused on mobile phones are particularly important due to the scope of this study. Varghese (2020) argues that some brands offer their mobile phones with a %30 although they have similar qualities compared to substitute goods which may be because it can be Socio-economic indicators in some countries like India. Furthermore, Ebrahim et al (2016), Demirgüneş (2015) and Chepchirchir & Leting (2015) argue that since consumers try to maximize their utility, their favor for a brand may be the reason for being willing to pay a premium and buy the same brand’s product again. Djatmiko & Pradana (2016) conduct an empirical analysis using smartphones and they found they found that brand image has a significant relationship with purchasing decisions which can affect product price. In addition, Dwivedi (2015) and Thakur (2016) conduct a survey with more than 400 smartphone users and they found that branding has an impact on consumers’ perspective on quality, satisfaction and price. Besides, Grankvist, Johnsen & Hanss, D. (2019) published an interesting study which found that customers from Sweeden, Norway and Germany are willing to pay a 12% to 18% price premium for Samsung mobile phones which have sustainability certification. Therefore environmentally friendly brands may differ from other brands since their customers are willing to pay a premium.
Žemgulienė (2013) and. Ligas & Chaudhuri (2012) argue that price premiums may occur in different stores and consumers are willing to pay higher prices in some markets. Similar intention also exist in e-commerce, since feedback on e-commerce websites increases trust which reduces asymmetric information and risk premiums, reputable and high-quality websites which have credible and great numbers of comments may charge higher prices for the same products (Ba and Pavlou, 2002; Schlosser, White & Lloyd 2006). Indeed, Gregg & Walczak (2010) found a 12% price premium for higher-quality websites. Besides, Melis et al (2015) argue that people tend to choose websites that also have physical shops which may cause a price premium for websites that also have online stores.
In the e-commerce of mobile phones in Turkey, it could be argued that there is an oligopoly. A small number of firms dominate the market. Online marketplaces such as Hepsiburada, Trendyol, Mediamarkt and Teknosa are the main controlling firms in the phone market. These e-commerce websites, companies have gathered an edge over the producing companies. These e-commerce websites have a strong presence in the market and have the ability to influence pricing and other market conditions. Therefore, these companies have a significant amount of market power, and it could be said that they form an oligopoly in the e-commerce of mobile phones in Turkey. (Habertürk Sanlı 2023). Some of the new regulations towards these websites are supposed to downgrade their powers.
One of the recognized problems in this market is that while the e-commerce website is considered as an intermediary, the e-commerce company could hold the money gained from the buyer for nearly 30 days. (Milliyet 2022) With the new regulations, the e-commerce company has to pay the producer in not more than exactly 5 days, so there won’t be free cash that has to be paid later and can be used.
Another problem which can be considered as a more major one is the license issue. Somewhat can be considered as being against competition policy because it was the same price for a license fee and licensing obligation for e-commerce websites. The new regulation is still being discussed, not in the way that it will surely stop the growth and oligopoly of these huge e-commerce websites because it will stop, but still won’t be enough help towards the new e-commerce companies. (Habertürk Sanlı 2023) So, the requirements for being able to sell have not been changed rather that the price is played with. These taxes and fees are between three-ten-thousandths and 25 percent of the net transaction volume, with a license fee of up to 25 percent of transactions made through the platform. In practice, this will impose an extraordinary obligation on large-scale platforms.
A new regulation that will increase competition and may help new e-commerce websites are data migration requests. These requests from the producers must be accepted as an obligation to the law. In other words, from now on, sellers will be able to pull their own data from the platforms and transfer them to whichever competing platforms the producers chose. (Habertürk Sanlı 2023) The goal is to increase market competition and decrease oligopoly, from now on Producers will have the leverage over the intermediary and will choose the beneficial e-commerce website, many have found this positive.
Now take a look at the taxes that are being imposed to phones, domestic and foreign. The new regulations have also changed in the ÖTV part of the phone market. The ratios are still the same, but they have changed the ceiling prices so that domestic phones are tied up with fewer tax ratios and foreign phones will be with higher tax ratios (BBC 2022). The ceiling limit for %25 percent tax has been increased to 1500 TL from 640 TL, the ceiling limit for %40 percent tax has been increased to 3000 TL from 1500 TL, and from 3000 TL and upwards it will be %50 percent. The prices have been selected by the possibility of different prices between domestic and foreign, which the goal is to taking less from the domestic phone producers since it is cheaper. (Bloomberg Uçak 2022) Another new regulation for the phones that are being brought into the country is the requirement of a surveillance certificate if the phone is less than 200 dollars. To be able to import without submitting a surveillance document, the customs value must be increased and declared as 200 dollars. This affects the taxes collected on imports, overall increasing the prices for foreign phones, (CNN Turk 2023) in addition to the IMEI registration fee becoming 6.091,30 TL. All for it to help the production of domestic phones.
Izak Atiyas and Pınar Doğan (2007) focus on how the level of competition is negatively affected by blocking the possibility of new investment and new companies in the phone market with useless incentives and overall bad regulations. They point out some historical facts that happened that led to oligopolies forming in the phone market. An example is Turkcell making exclusive deals with handset distributors at 1998 that blocked new companies from entering the market. This situation nearly took 2 years of going back and forth with TELSİM reporting Turkcell to the authorities which eventually led to TELSİM winning and Turkcell losing their monopoly. The government not being able to solve or either taking a long time to solve the blockage of new companies was a major part of the problem. We must also state the auction site from the government. Binmore and Klemperer (2001) believed that the winner of the first auction would always bid for the second auction as well, biding a higher price than the actual license worth trying to stop an entrance for a new firm. They also state that “strong” and “weak” operators’ levels of competition damaged the total welfare. Customers being able to terminate agreements with the strong operator improved customer welfare and weak operators’ profit. Nevertheless, the reduction in strong operators’ welfare is even bigger so the total welfare declines. Izak Atiyas (2005) stated that companies used to deal with operators to create certain blockages for access resulting in consumers’ loss of interest. But the regulation at that time solved this issue trying to match the level of competition by operators may force other operators to open that access. This regulation was aimed to bring transparency and equality to the competition between phone companies.
Apelbaum, E., Gerstner, E., & Naik, P. A. (2003). The effects of expert quality evaluations versus brand name on price premiums. Journal of Product & Brand Management.
Atiyas, İ., & Doğan, P. (2007). When good intentions are not enough: Sequential entry and competition in the Turkish mobile industry. Science Direct, 31(8-9), 502–523.
Atiyas, I. (2005). Competition and regulation in the Turkish telecommunications industry
Ba, S., & Pavlou, P. A. (2002). Evidence of the effect of trust building technology in electronic markets: Price premiums and buyer behavior. MIS quarterly, 243-268.
BBC. (n.d.). ÖTV: CEP Telefonlarındaki Yeni Düzenleme Fiyatlara Nasıl yansıyacak? BBC News Türkçe. Retrieved January 23, 2023, from https://www.bbc.com/turkce/haberler-dunya-61148140
Binmore, K., & Klemperer, P. (2001). Biggest auction ever: The sale of the British 3G telecom licenses. Economic Journal, 112, 73–96
Chepchirchir, J., & Leting, M. (2015). Effects of brand quality, brand prestige on brand purchase intention of mobile phone brands: Empirical assessment from Kenya.
CNN TÜRK. (2023, January 1). 2023 yurt dışından Telefon getirme ücreti NE Kadar, Telefonu Pasaporta Kaydetme ücreti Kaç Tl? CNN TÜRK. Retrieved from https://www.cnnturk.com/teknoloji/2022-yurt-disindan-telefon-getirme-ucreti-ne-kadar-telefonu-pasaporta-kaydetme-ucreti-kac-tl
Demirgüneş, B. K. (2015). Relative importance of perceived value, satisfaction and perceived risk on willingness to pay more. International Review of Management and Marketing, 5(4), 211-220.
Djatmiko, T., & Pradana, R. (2016). Brand image and product price; Its impact for Samsung smartphone purchasing decision. Procedia-Social and Behavioral Sciences, 219, 221-227.
Dwivedi, A. (2015). A higher-order model of consumer brand engagement and its impact on loyalty intentions. Journal of Retailing and Consumer Services, 24, 100-109.
Dwivedi, A., Nayeem, T., & Murshed, F. (2018). Brand experience and consumers’ willingness-to-pay (WTP) a price premium: Mediating role of brand credibility and perceived uniqueness. Journal of Retailing and Consumer Services, 44, 100-107.
Ebrahim, R., Ghoneim, A., Irani, Z., & Fan, Y. (2016). A brand preference and repurchase intention model: the role of consumer experience. Journal of Marketing Management, 32(13-14), 1230-1259.
Grankvist, G., Johnsen, S. Å. K., & Hanss, D. (2019). Values and willingness-to-pay for sustainability-certified mobile phones. International Journal of Sustainable Development & World Ecology, 26(7), 657-664.
Gregg, D. G., & Walczak, S. (2010). The relationship between website quality, trust and price premiums at online auctions. Electronic Commerce Research, 10(1), 1-25.
Hyokjin Kwak, Joseph F. Rocereto, and Marina Puzakova (2013) ,“Better Not Smile At the Price: the Contradictory Role of Brand Anthropomorphization on Price Fairness”, in NA - Advances in Consumer Research Volume 41, eds. Simona Botti and Aparna Labroo, Duluth, MN : Association for Consumer Research.
Landes, W.M., & Posner, R.A. (1987). Trademark law: An economic perspective. Journal of Law and Economics, 30(October), 265 –309.
Ligas, M., & Chaudhuri, A. (2012). The moderating roles of shopper experience and store type on the relationship between perceived merchandise value and willingness to pay a higher price. Journal of Retailing and Consumer Services, 19(2), 249-258.
Lingyao Yuan, Dennis, A. R., & Potter, R. F. (2016). Interacting Like Humans? Understanding the Neurophysiological Processes of Anthropomorphism and Consumer’s Willingness to Pay in Online Auctions. In ICIS.
MacInnis, D. J., & Folkes, V. S. (2017). Humanizing brands: When brands seem to be like me, part of me, and in a relationship with me. Journal of Consumer Psychology, 27(3), 355-374.
Melis, K., Campo, K., Breugelmans, E., & Lamey, L. (2015). The impact of the multi-channel retail mix on online store choice: does online experience matter?. Journal of Retailing, 91(2), 272-288.
Milgrom, P., & Roberts, J. (1986). Price and advertising signals of product quality. Journal of Political Economy, 94(August), 796 –821.
Milliyet.com.tr. (2022, October 19). ’e-ticaret’te Zorla Kampanyaya son! Milliyet. Retrieved January 23, 2023, from https://www.milliyet.com.tr/ekonomi/e-ticarette-zorla-kampanyaya-son-6843168
Park, C. W., MacInnis, D. J., Priester, J., Eisingerich, A. B., & Iacobucci, D. (2010). Brand attachment and brand attitude strength: Conceptual and empirical differentiation of two critical brand equity drivers. Journal of marketing, 74(6), 1-17.
Sanlı. (2023, January 1). Yeni e-ticaret Yasası Yürürlüğe Girdi. hthayat.haberturk.com. Retrieved January 23, 2023, from https://www.haberturk.com/yeni-e-ticaret-yasasi-yururluge-girdi-3552345-ekonomi
Schlosser, A. E., White, T. B., & Lloyd, S. M. (2006). Converting web site visitors into buyers: how web site investment increases consumer trusting beliefs and online purchase intentions. Journal of marketing, 70(2), 133-148.
Shahid, F. (2022). Siri or Google Assistant?: The impact of voice assistant anthropomorphism on consumer usage intention (Doctoral dissertation, Macquarie University).
Steiner, B.E. (2004). Australian wines in the British market: A hedonic price analysis. Agribusiness, 20, 287 –307.
Sullivan, M.W. (1998). How brand names affect the demand for twin automobiles. Journal of Marketing Research, 35(2), 154 –165.
Thakur, R. (2016). Understanding customer engagement and loyalty: a case of mobile devices for shopping. Journal of Retailing and consumer Services, 32, 151-163.
Thomson, M., MacInnis, D.J. & Park C.W. (2005). The Ties that Bind: Measuring the Strength of Consumers’ Emotional Attachment to Brands. Journal of Consumer Psychology, 15, (1), 77-91.
Troncoso, J.L., & Aguirre, M. (2006). Price determinants of Chilean wines in the U.S. market: A hedonic approach. The Spanish Journal of Agricultural Research, 4(2), 124 –129.
Uçak, H. Y. A. Z. A. R. I. N. T. Ü. M. (2022, April 21). Hakan Uçak - Yeni ÖTV Düzenlemesi Cep Telefonu Fiyatlarını Nasıl Etkileyecek? BloombergHT. Retrieved January 23, 2023, from https://www.bloomberght.com/yorum/hakan-ucak/2304671-yeni-otv-duzenlemesi-cep-telefonu-fiyatlarini-nasil-etkileyecek#:~:text=S%C3%B6z%20konusu%20d%C3%BCzenleme%20uyar%C4%B1nca%3B%201.500,50%20oran%C4%B1nda%20%C3%96TV%20tahsil%20edilecek
Varghese, N. (2020). THE EFFECT OF BRAND IMAGE AND BRAND EQUITY ON INTENTION TO PAY PREMIUM, PJAEE 17(6), 2237-2245.
Veale, R., & Quester, P. (2008). Consumer sensory evaluations of wine quality: The respective influence of price and country of origin. Journal of Wine Economics, 3(1), 10 –28.
Žemgulienė, J. (2013). RELATIVE IMPORTANCE OF RETAIL STORE IMAGE AND CONSUMERS CHARACTERISTICS ON THE PERCEPTION OF VALUE AND WILLINGNESS TO PAY A PREMIUM PRICE. Regional Formation & Development Studies, (9).
In these graphs, the price of mobile phones (on the Y-axis) and the RAM (on the X-axis) for four different brands, Apple, Samsung, Huawei, and Xiaomi are examined. The charts show that there is a positive relationship between the two variables, meaning that as the RAM of a mobile phone increases, the price of the phone also tends to increase. The slope of the regression line for the Huawei chart is smaller than the other three brands, indicating that the relationship between RAM and price is less steep for Huawei phones compared to the other brands. The steepest brand is Apple among these four brands. Samsung and Xiaomi have wider range of RAM options compared the other two.
Similarly, the price of mobile phones is on the Y-axis and the storage capacity is on the X-axis. Again we examine four different mobile phone brands which are Apple, Samsung, Huawei, and Xiaomi. As the storage capacity of a mobile phone increases, the price of the phone also tends to increase since the charts show that there is a positive relationship between the two variables. Although the Xiaomi chart appears to have the steepest slope, this could be due to a bug that shows the Y-axis as longer than it should be. It’s important to note that the max storage capacity for each brand is different: Apple max 128 GB, Samsung max 256 GB, Xiaomi max 256 GB, and Huawei max 512 GB.
These 4 graph illustrates the relationship between Screen sizes and the prices of phones for 4 different brands, price on Y-axis and screen size on X-asis. There is a positive relationship between price and screen sizes because we can see that the ceiling prices increase with higher inches. However this is not definite, we can also observe that for Samsung and Huawei there is a lot of data under the regression line aswell. These may be in touch with what the customer prefers in these situtations. Customers may also prefer expensive phones that are easier to deal with rather than having a big screen, resulting in high-tech mobile phones to have different screen sizes and same prices.
The figure above indicates that for all of the biggest 4 brands camera quality and price has a positive correlation. Nonetheless, the size of these correlations are different. The slope of Apple is the highest, followed by Huawei, Samsung, and Xiaomi respectively. This means that the camera quality has higher correlation with the prices of Apple, Huawei, Samsung, and Xiaomi in order.
We created this graph to see how the brands are distributed across different price levels. As seen in the graph, Samsung offers many products to customers at every price level and has a large market share in most of them. The section with the most products, between 3000-5000 lira, is concentrated with all companies except Apple. Additionally, it is seen that companies offer products that will allow them to compete at higher prices.
On this graph, we have grouped the sellers on our dataset according to the domains of the firms. For e-commerce platforms, we have grouped Hepsiburad, Trendyol, and Amazon; for technology sellers, we have grouped Teknosa, Turkcell, Mediamarkt, and Vatanbilgisayar. Firstly, e-commerce firms have close to five times more listings in our dataset, and there is not a dominance by technology firms at any price level. One of the reasons for this is that on e-commerce platforms, any firm is allowed to sell, but on the technology side, most of the firms sell products themselves. Therefore, e-commerce websites are more competitive compared to technology firms’ websites.
In this section, we conduct regression analysis for four biggest mobile phone brands which are Apple, Samsung, Huawei, and Xiaomi totally and separately. In the regression of the biggest four brands, R-squared is low as it is 0.46, therefore, model is not very good explaining the price of mobile phones. On the other hand, in the separate models are R-squareds are significantly better as they are 0.92, 0.91, 0.87 and 0.69 which means that these models are successful in explaining the mobile phone price with variables.
Regression of the Biggest 4 Brands
# The biggest four brands
telefondatambig4 <- telefondatam %>% filter(brands %in% "Xiaomi" | brands %in% "Samsung" | brands %in% "Huawei" | brands %in% "Apple")
modelDeneme2 <- lm(price ~ storage + screen + cam + RAM, telefondatambig4)
summary(modelDeneme2)
##
## Call:
## lm(formula = price ~ storage + screen + cam + RAM, data = telefondatambig4)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20244 -4181 -1768 1000 35564
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4353.802 3945.632 1.103 0.270
## storage 71.038 5.977 11.886 < 2e-16 ***
## screen -577.448 687.732 -0.840 0.401
## cam -64.701 11.197 -5.779 1.07e-08 ***
## RAM 1200.547 192.803 6.227 7.62e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 8012 on 813 degrees of freedom
## (628 observations deleted due to missingness)
## Multiple R-squared: 0.4547, Adjusted R-squared: 0.452
## F-statistic: 169.5 on 4 and 813 DF, p-value: < 2.2e-16
Apple
# Apple
telefondatamApple <- telefondatam %>% filter(brands == "Apple")
modelApple <- lm(data = telefondatamApple, price ~ storage + screen + cam + RAM)
summary(modelApple)
##
## Call:
## lm(formula = price ~ storage + screen + cam + RAM, data = telefondatamApple)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8414.7 -3071.4 -804.5 3995.1 15122.2
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4883.81 4855.71 -1.006 0.316648
## storage 118.46 21.66 5.469 2.71e-07 ***
## screen -1611.52 1138.42 -1.416 0.159627
## cam 154.24 41.82 3.688 0.000347 ***
## RAM 6169.04 765.31 8.061 8.32e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4539 on 114 degrees of freedom
## (13 observations deleted due to missingness)
## Multiple R-squared: 0.9183, Adjusted R-squared: 0.9154
## F-statistic: 320.2 on 4 and 114 DF, p-value: < 2.2e-16
Xiaomi
# Xiaomi
telefondatamX <- telefondatam %>% filter(brands == "Xiaomi")
modelDenemeX <- lm(price ~ storage + screen + cam + RAM, telefondatamX)
summary(modelDenemeX)
##
## Call:
## lm(formula = price ~ storage + screen + cam + RAM, data = telefondatamX)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6971.4 -1248.3 532.0 843.4 3540.6
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -51040.611 13000.640 -3.926 0.000235 ***
## storage 11.902 6.811 1.748 0.085932 .
## screen 7683.249 2007.537 3.827 0.000324 ***
## cam -21.714 7.386 -2.940 0.004737 **
## RAM 2068.863 182.605 11.330 3.18e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2258 on 57 degrees of freedom
## (166 observations deleted due to missingness)
## Multiple R-squared: 0.9043, Adjusted R-squared: 0.8975
## F-statistic: 134.6 on 4 and 57 DF, p-value: < 2.2e-16
Huawei
# Huawei
telefondatamH <- telefondatam %>% filter(brands == "Huawei")
modelDenemeH <- lm(price ~ storage + screen + cam + RAM, telefondatamH)
summary(modelDenemeH)
##
## Call:
## lm(formula = price ~ storage + screen + cam + RAM, data = telefondatamH)
##
## Residuals:
## Min 1Q Median 3Q Max
## -11815.2 -2084.9 -96.3 1861.2 9792.7
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 13687.69 5165.57 2.650 0.008644 **
## storage 76.25 4.00 19.063 < 2e-16 ***
## screen -2852.33 894.79 -3.188 0.001645 **
## cam -63.07 16.92 -3.728 0.000246 ***
## RAM 1554.15 224.95 6.909 5.29e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3535 on 218 degrees of freedom
## (125 observations deleted due to missingness)
## Multiple R-squared: 0.8693, Adjusted R-squared: 0.8669
## F-statistic: 362.4 on 4 and 218 DF, p-value: < 2.2e-16
Samsung
# Samsung
telefondatamS <- telefondatam %>% filter(brands == "Samsung")
modelDenemeS <- lm(price ~ storage + screen + cam + RAM, telefondatamS)
summary(modelDenemeS)
##
## Call:
## lm(formula = price ~ storage + screen + cam + RAM, data = telefondatamS)
##
## Residuals:
## Min 1Q Median 3Q Max
## -12222 -2709 -745 2052 16305
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10414.092 3506.614 2.970 0.003155 **
## storage 47.222 6.222 7.589 2.2e-13 ***
## screen -2139.889 594.909 -3.597 0.000361 ***
## cam 28.405 8.948 3.174 0.001615 **
## RAM 1327.386 151.018 8.790 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4135 on 409 degrees of freedom
## (324 observations deleted due to missingness)
## Multiple R-squared: 0.6918, Adjusted R-squared: 0.6888
## F-statistic: 229.5 on 4 and 409 DF, p-value: < 2.2e-16
Combined Regression
model <- lm(data = telefondatam, price ~ storage + screen + cam + RAM + biggestSellersDummy + techSellersDummy + biggestBrandsDummy + midBrandsDummy)
summary(model)
##
## Call:
## lm(formula = price ~ storage + screen + cam + RAM + biggestSellersDummy +
## techSellersDummy + biggestBrandsDummy + midBrandsDummy, data = telefondatam)
##
## Residuals:
## Min 1Q Median 3Q Max
## -15569 -3264 -822 1566 35864
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1528.784 2191.027 0.698 0.485423
## storage 46.696 3.349 13.943 < 2e-16 ***
## screen -845.436 360.995 -2.342 0.019288 *
## cam -44.328 6.496 -6.824 1.19e-11 ***
## RAM 1200.289 106.362 11.285 < 2e-16 ***
## biggestSellersDummy 993.928 285.593 3.480 0.000513 ***
## techSellersDummy 675.008 641.991 1.051 0.293199
## biggestBrandsDummy 5962.873 313.630 19.012 < 2e-16 ***
## midBrandsDummy 1774.594 426.629 4.160 3.33e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5917 on 1849 degrees of freedom
## (2474 observations deleted due to missingness)
## Multiple R-squared: 0.4977, Adjusted R-squared: 0.4955
## F-statistic: 229 on 8 and 1849 DF, p-value: < 2.2e-16
library(data.table)
library(dplyr)
library(stringr)
library(ggplot2)
library(tidyr)
library(ggipraph)
library(car)
library(rgl)
library(scatterplot3d)
library(plotly)
library(rvest)
library(rvest)
library(stringr)
library(data.table)
library(dplyr)
library(tidyr)
# create links
product_names_url <- "https://www.epey.com/akilli-telefonlar/e/TjtfczoxMDoiZml5YXQ6REVTQyI7="
product_names_url <- str_c(product_names_url,"/",c(1:30))
product_names_url
# Iterate over the elements of the product_names_url vector
title_html <- list()
for (i in seq_along(product_names_url)) {
url <- product_names_url[i]
# Read the HTML from the URL
urldata <- read_html(url)
# Extract the text of all the p tags in the HTML
p_text <- urldata %>%
html_nodes("p") %>%
html_text()
# Extract the title from the HTML
title_html[[i]] <- html_nodes(urldata, ".urunadi")
# Do something with the extracted data, for example print it
print(p_text)
print(title_html[[i]])
}
# Extract the text from the title nodes and concatenate into a single character vector
title <- sapply(title_html, html_text)
# View the data for each URL
title
# Organize product names
title = gsub("İ","i", title)
title = gsub("\\+", "", title)
title = gsub(" ", "-", title)
title = gsub("\\(", "-", title)
title = gsub("\\)", "", title)
title = gsub("--","-",title)
title<- title[-31]
title
# Convert Product names to links
product_links <- "https://www.epey.com/akilli-telefonlar"
product_links <- str_c(product_links,"/",title)
product_links <- paste(product_links,".html",sep="")
# delete duplicates
product_links <- unique(product_links)
# create empty vectors
isim <- character()
price <- character()
specs <- character()
attributes <- character()
# forge the data
telefondatam <- data.frame()
for (link in product_links) {
# Read the HTML from the URL
webdata <- try(read_html(link), silent = TRUE)
# Check if an error occurred
if (inherits(webdata, "try-error")) {
# If an error occurred, skip to the next iteration of the loop
next
}
# Extract the data from the HTML
# check the vector lengths
isim <- html_nodes(webdata, ".baslik a") %>% html_text()
price <- html_nodes(webdata, ".urun_fiyat") %>% html_text() %>% head(6)
length(price) <- 6
specs <- html_nodes(webdata, "#id14 a , #id21 a , .ozellik1870+ .cs1 a , #id19 a , #id12 a , #id1 a") %>% html_text()
specs <- specs[1:min(length(specs), 6)]
specs <- c(specs, rep(NA, max(0, 6 - length(specs))))
attributes <- c("Ekran Boyutu", "Kamera Çözünürlüğü", "İşlemci Çekirdeği", "RAM", "Dahili Depolama", "Çıkış Yılı")
# Extract the data-link attributes from all the a tags and keep only the first 8
sellers <- html_nodes(webdata, 'a[rel="nofollow"]') %>% html_attr("data-link") %>% head(6)
# sellers verisini link olarak çektiğimiz için düzenliyoruz
sellers <- gsub("^[^.]+\\.", "", sellers)
sellers <- gsub("\\..*$", "", sellers)
sellers <- sellers[1:min(length(sellers), 6)]
sellers <- c(sellers, rep(NA, max(0, 6 - length(sellers))))
isim_6 <- rep(isim,6)
name <- data.frame(isim_6)
# organize the price
price <- gsub("\n","",price)
price <- gsub("Ücretsiz Kargo","",price)
price <- gsub("\\+ Kargo","",price)
# add each piece of data to the table
ozellik <- data.frame(specs, attributes)
ticaret <- data.frame(price,sellers)
genelozet <- data.frame(ozellik,ticaret,name)
telefondatam <- rbind(telefondatam,genelozet)
}
data <- telefondatam
data2 <- data %>%
select(attributes, specs) %>% # select only the relevant columns
group_by(attributes) %>% # group the data by the attributes column
mutate(row = row_number()) %>% # create a new column with the row number
pivot_wider(names_from = attributes, values_from = specs)
# Print the new dataframe
# Create an empty dataframe to store the repeated data
repeated_data <- data.frame()
# Loop through every row of the new_data
for (i in 1:nrow(data2)) {
# Repeat the current row 6 times
temp_data <- data.frame(matrix(nrow = 1, ncol = ncol(data2)))
for (j in 1:6){
temp_data[j,] <- data2[i,]
}
# Append the repeated rows to the repeated_data
repeated_data <- rbind(repeated_data, temp_data)
}
telefondatam$storage <- repeated_data$X6
telefondatam$screen <- repeated_data$X2
telefondatam$date <- repeated_data$X7
telefondatam$cam <- repeated_data$X3
telefondatam$core <- repeated_data$X4
telefondatam$RAM <- repeated_data$X5
telefondatam <- select(telefondatam, -attributes,-specs)
seckindata <- telefondatam
save(seckindata,file = "seckindata.rdata")
library(data.table)
library(dplyr)
library(stringr)
library(ggplot2)
library(tidyr)
library(ggipraph)
library(car)
library(rgl)
library(scatterplot3d)
library(ggplotly)
custom_theme <- theme_classic() +
theme(plot.background = element_rect(fill = "gray"),
panel.grid.major = element_line(color = "lightgray"),
panel.grid.minor = element_line(color = "lightgray"),
axis.line = element_line(color = "black"),
axis.text.x = element_text(size = 12, color = "black"),
axis.text.y = element_text(size = 12, color = "black"),
axis.title.x = element_text(size = 14, color = "black", face = "bold"),
axis.title.y = element_text(size = 14, color = "black", face = "bold"),
legend.title = element_text(size = 14, color = "black", face = "bold"),
legend.text = element_text(size = 12, color = "black"))
Sys.setlocale(category = "LC_ALL", locale = "Turkish")
telefondatam <- seckindata
telefondatam$price <- gsub("\\.","",telefondatam$price)
telefondatam$price <- gsub("\\,",".",telefondatam$price)
telefondatam$price <- suppressWarnings(as.numeric(gsub(" TL","",telefondatam$price)))
telefondatam <- telefondatam %>% select(-1) %>% mutate(storage = suppressWarnings(as.numeric(substr(storage, 1, nchar(storage) - 3))),
screen = suppressWarnings(as.numeric(substr(screen, 1, nchar(screen) - 4))),
date = as.numeric(date),
cam = suppressWarnings(as.numeric(substr(cam, 1, nchar(cam) - 3))),
core = suppressWarnings(as.numeric(substr(core, 1, nchar(core) - 9))),
RAM = suppressWarnings(as.numeric(substr(RAM, 1, nchar(RAM) - 3))))
#### Clean wrong values from the data
telefondatam <- filter(telefondatam, RAM <= 19)
#Organization of the sellers and transformation of them to dummy variables
sellers <- unique(telefondatam$sellers)
biggestSellers <- c("amazon", "hepsiburada", "trendyol")
techSellers <- c("teknosa", "vatanbilgisayar", "mediamarkt", "samsung", "huawei")
alternativeSellers <- sellers[!sellers %in% biggestSellers]
alternativeSellers <- alternativeSellers[!alternativeSellers %in% techSellers]
alternativeSellers
telefondatam$biggestSellersDummy <- ifelse(telefondatam$sellers %in% biggestSellers, 1, 0)
telefondatam$techSellersDummy <- ifelse(telefondatam$sellers %in% techSellers, 1, 0)
telefondatam$alternativeSellersDummy <- ifelse(telefondatam$sellers %in% alternativeSellers, 1, 0)
#Organization of the brands and transformation of them to dummy variables
brands <- gsub("\\ .*","", telefondatam$isim_6)
telefondatam$brands <- brands
brandNames <- unique(brands)
biggestBrands <- c("Apple", "Samsung", "Huawei", "Xiaomi")
midBrands <- c("Oppo", "Redmi", "Vestel", "Asus", "Sony", "Casper", "Motorola", "Nokia")
smallBrands <- brandNames[!brandNames %in% biggestBrands]
smallBrands <- smallBrands[!smallBrands %in% midBrands]
unique(smallBrands)
telefondatam$biggestBrandsDummy <- ifelse(telefondatam$brands %in% biggestBrands, 1, 0)
telefondatam$midBrandsDummy <- ifelse(telefondatam$brands %in% midBrands, 1, 0)
telefondatam$smallBrandsDummy <- ifelse(telefondatam$brands %in% smallBrands, 1, 0)
##### General Case and sellers
model <- lm(data = telefondatam, price ~ storage + screen + cam + RAM + biggestSellersDummy + techSellersDummy)
summary(model)
#####General Case
model2 <- lm(data = telefondatam, price ~ storage + screen + cam + RAM)
summary(model2)
######Graphs of General Case
ggplot(telefondatam, aes(price, RAM)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatam, aes(price, storage)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatam, aes(price, screen)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatam, aes(price, cam)) +
geom_point()+geom_smooth(method="lm")+custom_theme
avPlot3d(model2,coef1="cam", coef2 = "RAM",id = TRUE, fit="robust")
#apple graphs
telefondatamApple <- telefondatam %>% filter(brands == "Apple")
ggplot(telefondatamApple, aes(RAM, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatamApple, aes(storage, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatamApple, aes(screen, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatamApple, aes(cam, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme
#### Apple model and sellers
modelApple <- lm(data = telefondatamApple, price ~ storage + screen + cam + RAM + biggestSellersDummy + techSellersDummy)
summary(modelApple)
###### Apple Model.
modelApple2 <- lm(data = telefondatamApple, price ~ storage + screen + cam + RAM)
##### Apple 3D graph
avPlot3d(modelApple,coef1="cam", coef2 = "RAM",id = TRUE, fit="robust")
modelApple3d <- lm(data = telefondatamApple, price ~ storage + screen + cam)
###### not apple
telefondatamNotApple <- telefondatam %>% filter(brands == "Xiaomi" | brands == "Samsung" | brands == "Huawei")
ggplot(telefondatamNotApple, aes(RAM, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatamNotApple, aes(storage, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatamNotApple, aes(screen, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme
ggplot(telefondatamNotApple, aes(cam, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme
modelNotApple <- lm(data = telefondatamNotApple, price ~ storage + screen + cam + RAM + biggestSellersDummy + techSellersDummy)
summary(modelNotApple)
modelNotApple2 <- lm(data = telefondatamNotApple, price ~ storage + screen + cam + RAM)
summary(modelNotApple2)
avPlot3d(modelNotApple2,coef1="cam", coef2 = "RAM",id = TRUE, fit="robust")
#### Big4
telefondatambig4 <- telefondatam %>% filter(brands == "Xiaomi" | brands == "Samsung" | brands == "Huawei" | brands == "Apple")
ggplot(telefondatambig4, aes(RAM, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme +
facet_wrap(~brands, ncol = 2, scales = "free")
ggplot(telefondatambig4, aes(storage, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme +
facet_wrap(~brands, ncol = 2, scales = "free")
ggplot(telefondatambig4, aes(screen, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme +
facet_wrap(~brands, ncol = 2, scales = "free")
ggplot(telefondatambig4, aes(cam, price)) +
geom_point()+geom_smooth(method="lm")+custom_theme +
facet_wrap(~brands, ncol = 2, scales = "free")
####Price Range And Graph
pricerange <- group_by(telefondatam, brands)
pricerange <- filter(pricerange, brands == "Apple"| brands =="Xiaomi"|brands =="Huawei"|brands =="Samsung"|brands =="Oppo"|brands =="General")
pricerange <- filter(pricerange, price <= 25000)
ggplot(pricerange, aes(x=price, fill=brands)) +
geom_histogram(binwidth = 100) +
ggtitle("Range of Prices in Mobile Phones 0-25000TRY") +
xlab("Price (in TRY)") +
ylab("Frequency")
ggplotly(ggplot(pricerange, aes(x=price, fill=brands)) +
geom_histogram(binwidth = 100) +
ggtitle("Range of Prices in Oppo Products by Brand") +
xlab("Price (in TRY)") +
ylab("Frequency") +
scale_fill_discrete(name = "Brand"))
##### price range sellers
sellersrange <- group_by(telefondatam,sellers)
biggsetecommercesrange <- filter(sellersrange, sellers == "amazon"|sellers== "hepsiburada"|sellers== "trendyol")
techsellersrange <- filter(sellersrange, sellers =="mediamarkt"|sellers=="teknosa"|sellers=="turkcell"|sellers=="vatanbilgisayar"|sellers=="samsung"|sellers=="huawei")
techseller <- data.frame(1:259)
techseller$price <- techsellersrange$price
techseller$seller <- rep("tech",times=259)
ecommerce<- data.frame(1:921)
ecommerce$price <- biggsetecommercesrange$price
ecommerce$seller <- rep("ecommerce",times= 921)
sellerpricerange <- data.frame(1:1180)
sellerpricerange$seller <- c(ecommerce$seller,techseller$seller)
sellerpricerange$price <- c(ecommerce$price,techseller$price)
sellerpricerange <- filter(sellerpricerange, price <= 30000)
ggplotly(ggplot(sellerpricerange, aes(x=price,fill=seller)) +
geom_histogram(binwidth = 150) +
ggtitle("Range of Prices and Product Quantities by Seller 0-30000TRY") +
xlab("Price (in TRY)") +
ylab("Frequency") +
scale_fill_discrete(name = "Platform"))
######Model for sellers
# #Just in case
# brandAppleDummy <- ifelse(brands == "Apple", 1, 0)
# brandSamsungDummy <- ifelse(brands == "Samsung", 1, 0)
# brandHuaweiDummy <- ifelse(brands == "Huawei", 1, 0)
# brandXiaomiDummy <- ifelse(brands == "Xiaomi", 1, 0)
# brandOnePlusDummy <- ifelse(brands == "OnePlus", 1, 0)
# brandPocoDummy <- ifelse(brands == "Poco", 1, 0)
# brandOppoDummy <- ifelse(brands == "Oppo", 1, 0)
# brandRedmiDummy <- ifelse(brands == "Redmi", 1, 0)
# brandRealmeDummy <- ifelse(brands == "realme", 1, 0)
# brandInfinixDummy <- ifelse(brands == "Infinix", 1, 0)
# brandVivoDummy <- ifelse(brands == "Vivo", 1, 0)
# brandHonorDummy <- ifelse(brands == "Honor", 1, 0)
# brandMotorolaDummy <- ifelse(brands == "Motorola", 1, 0)
# brandTecnoDummy <- ifelse(brands == "Tecno", 1, 0)
# brandOmixDummy <- ifelse(brands == "Omix", 1, 0)
# brandElephoneDummy <- ifelse(brands == "Elephone", 1, 0)
# brandCasperDummy <- ifelse(brands == "Casper", 1, 0)
# brandTCLDummy <- ifelse(brands == "TCL", 1, 0)
# brandHikingDummy <- ifelse(brands == "Hiking", 1, 0)
# brandHTCDummy <- ifelse(brands == "HTC", 1, 0)
# brandTridentDummy <- ifelse(brands == "Trident", 1, 0)
# brandPremierDummy <- ifelse(brands == "Premier", 1, 0)
# brandGeneralDummy <- ifelse(brands == "General", 1, 0)
# brandVestelDummy <- ifelse(brands == "Vestel", 1, 0)
# brandLGDummy <- ifelse(brands == "LG", 1, 0)
# brandAlcatelDummy <- ifelse(brands == "Alcatel", 1, 0)
# brandReederDummy <- ifelse(brands == "Reeder", 1, 0)
# brandOukitelDummy <- ifelse(brands == "Oukitel", 1, 0)
# brandZTEDummy <- ifelse(brands == "ZTE", 1, 0)
# brandDijitsuDummy <- ifelse(brands == "Dijitsu", 1, 0)
# brandUlefoneDummy <- ifelse(brands == "Ulefone", 1, 0)
# brandSonyDummy <- ifelse(brands == "Sony", 1, 0)
# brandLenovoDummy <- ifelse(brands == "Lenovo", 1, 0)
# brandBlackBerryDummy <- ifelse(brands == "BlackBerry", 1, 0)
# brandYotaPhoneDummy <- ifelse(brands == "YotaPhone", 1, 0)
# brandNubiaDummy <- ifelse(brands == "Nubia", 1, 0)
# brandGoogleDummy <- ifelse(brands == "Google", 1, 0)
# brandAsusDummy <- ifelse(brands == "Asus", 1, 0)
# brandNothingDummy <- ifelse(brands == "Nothing", 1, 0)
# brandSharpDummy <- ifelse(brands == "Sharp", 1, 0)
# brandBlackDummy <- ifelse(brands == "Black", 1, 0)
# brandNokiaDummy <- ifelse(brands == "Nokia", 1, 0)
# brandMeizuDummy <- ifelse(brands == "Meizu", 1, 0)
# brandSmartphoneDummy <- ifelse(brands == "Smartphone", 1, 0)